<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="vue.js"></script>
</head>

<body>
    <div id="app">
        <h1 v-show="title">新增的标题</h1>
        <button v-for="i in item">新按钮</button>
        <hr>
        <button @click.once="clickonce" >点击增加一行</button>
        <button @click="click">点击增加一个按钮</button>
    </div>
    <script>
         var app = new Vue({
            el:'#app',
            data: {
                title:false,
                item :0
            },
            methods:{
                clickonce(){
                    this.title=true
                },
                click(){
                    this.item++
                }
            }
        })
    </script>
</body>

</html>